export function getTreeChildId(tree: any[], id: string, childName: string = 'child', arr: any[] = []) {
  tree.forEach(it => {
    const childs = it[childName]
    arr.push(it[id])
    if (childs) {
      getTreeChildId(childs, id, childName, arr)
    }
  })
  return arr
}